package com.dianshang.elasticsearch;

/**
 * 搜索引擎(ElasticSearch)
 */
public class ElasticSearch {

    // 创建索引库名
    /**
     * PUT /zhaoyu
     * {
     *   "mappings": {
     *     "doc": {
     *       "properties": {
     *         "name": {"type": "text","analyzer": "ik_smart"},
     *         "sex": {"type": "text"},
     *         "age": {"type": "integer"},
     *         "types": {"type": "keyword"}
     *       }
     *     }
     *   }
     * }
     */

    // 查询索引库名中的所有数据
    /**
     * GET /zhaoyu/doc/_search
     */

    // 添加数据到索引库名
    /**
     * POST /zhaoyu/doc
     * {
     *    "name": "赵宇",
     *    "sex": "男",
     *    "age": 19,
     *    "types": "大"
     *
     * }
     */

    // 修改数据到索引库名————>前提条件是必须根据ID修改,要么会保错
    /**
     * POST /zhaoyu/doc/id
     * {
     *    "name": "赵宇",
     *    "sex": "男",
     *    "age": 19,
     *    "types": "大"
     *
     * }
     */

    // 删除索引库名
    /**
     * DELETE /zhaoyu
     */

}